package com.wd.myhome.viewmodel


import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.wd.current.model.Bean.DataBean
import com.wd.current.model.Utils.HttpUtils
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers

/**
 * 作者:张海峰
 * 时间:2024/10/16
 * 功能:
 */
class ConstellationmatchingViewModel:ViewModel() {
    var findRecommendConstellationData= MutableLiveData<DataBean.FindRecommendConstellationBean>()

    fun getRecommendConstellationData(
        userId:Int,
        sessionId:String,
        count:Int,
        maxFriendId:Int
    ){
        HttpUtils.httpUtils.aplis2.getRecommendConstellationData(userId, sessionId, count, maxFriendId)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe {
                findRecommendConstellationData.value=it
            }
    }

}